From 518e1001737d4bdd2abbc1bc00d7120c6f92af57 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 2 Aug 2006 15:06:29 +0100 Subject: [PATCH] [XEN] Allow quick building of individual files. For the purpose of quick compile testing of (namely smaller) changes, provide a means to build individual pieces underneath the xen dir (could equally be applied to tools, and the top level Makefile could also be made aware of this logic to make things even more consistent). At once, add a way to only pre-process files in case some of the more complicated macros need change and hence inspection of the results. Signed-off-by: Jan Beulich --- xen/Makefile | 12 ++++++++++++ xen/Rules.mk | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/xen/Makefile b/xen/Makefile index d9f5322eb6..cad1dc1407 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -146,3 +146,15 @@ _cscope: .PHONY: MAP MAP: $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + +.PHONY: FORCE +FORCE: + +%.o %.i: %.c FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%.o %.s: %.S FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + +%/: FORCE + $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o diff --git a/xen/Rules.mk b/xen/Rules.mk index 17a0eb04aa..15c0af3cc1 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -105,3 +105,9 @@ _clean_%/: FORCE %.o: %.S $(HDRS) Makefile $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@ + +%.i: %.c $(HDRS) Makefile + $(CPP) $(CFLAGS) $< -o $@ + +%.s: %.S $(HDRS) Makefile + $(CPP) $(CFLAGS) $(AFLAGS) $< -o $@ -- 2.30.2